# Top-Level CmakeLists.txt

cmake_minimum_required (VERSION 2.6)

# path to libraries
set (APPLICATIONS /Users/rogsoares/applications)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "-DPARALLEL")  

# FMDB
set (FMDB_INCLUDE "${APPLICATIONS}/FMDB-2011/include" CACHE PATH "Directory where FMDB header files can be found")
set (FMDB_LIB "${APPLICATIONS}/FMDB-2011/lib" CACHE PATH "Directory where the FMDB library can be found")
include_directories(${FMDB_INCLUDE})
link_directories(${FMDB_LIB})
link_libraries(FMDB-O)

# PARMETIS
set (PARMETIS_INCLUDE "${APPLICATIONS}/ParMetis-3.1/include" CACHE PATH "Directory where FMDB header files can be found")
set (PARMETIS_LIB "${APPLICATIONS}/ParMetis-3.1/lib" CACHE PATH "Directory where the FMDB library can be found")
include_directories(${PARMETIS_INCLUDE})
link_directories(${PARMETIS_LIB})
link_libraries(parmetis metis)

# AUTOPACK
set (AUTOPACK_INCLUDE "${APPLICATIONS}/autopack/include" CACHE PATH "Directory where FMDB header files can be found")
set (AUTOPACK_LIB "${APPLICATIONS}/autopack/lib" CACHE PATH "Directory where the FMDB library can be found")
include_directories(${AUTOPACK_INCLUDE})
link_directories(${AUTOPACK_LIB})
link_libraries(autopack-O)

# PETSC
set(PETSC_DIR "${APPLICATIONS}/petsc")
set(PETSC_INCLUDE "${PETSC_DIR}/include" "${PETSC_DIR}/include/private" CACHE PATH "Directory where PETSc header files can be found")
set(PETSC_LIB "${PETSC_DIR}/lib" CACHE PATH "Directory where the PETSc library can be found" )
include_directories(${PETSC_INCLUDE})
link_directories(${PETSC_LIB})
link_libraries(petscmat f2clapack petscksp petsc petscvec petscdm petscsnes petscts f2cblas petsccontrib)

PROJECT( Multigrid_Proj )

include_directories(	"${PROJECT_SOURCE_DIR}/include"
			 			"${PROJECT_SOURCE_DIR}/include/multigrid"
						"${PROJECT_SOURCE_DIR}/src"
						"${PROJECT_SOURCE_DIR}/src/multigrid"
                   )

add_subdirectory(src/multigrid)
add_subdirectory(src)
